package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ZhWaiterMapper;
import com.ruoyi.system.domain.ZhWaiter;
import com.ruoyi.system.service.IZhWaiterService;
import com.ruoyi.common.support.Convert;
import org.springframework.transaction.annotation.Transactional;

/**
 * 客服 服务层实现
 * 
 * @author ruoyi
 * @date 2019-04-26
 */
@Transactional(rollbackFor = Exception.class)
@Service
public class ZhWaiterServiceImpl implements IZhWaiterService 
{
	@Autowired
	private ZhWaiterMapper zhWaiterMapper;

	/**
     * 查询客服信息
     * 
     * @param id 客服ID
     * @return 客服信息
     */
    @Override
	public ZhWaiter selectZhWaiterById(Integer id)
	{
	    return zhWaiterMapper.selectZhWaiterById(id);
	}
	
	/**
     * 查询客服列表
     * 
     * @param zhWaiter 客服信息
     * @return 客服集合
     */
	@Override
	public List<ZhWaiter> selectZhWaiterList(ZhWaiter zhWaiter)
	{
	    return zhWaiterMapper.selectZhWaiterList(zhWaiter);
	}
	
    /**
     * 新增客服
     * 
     * @param zhWaiter 客服信息
     * @return 结果
     */
	@Override
	public int insertZhWaiter(ZhWaiter zhWaiter)
	{
	    return zhWaiterMapper.insertZhWaiter(zhWaiter);
	}
	
	/**
     * 修改客服
     * 
     * @param zhWaiter 客服信息
     * @return 结果
     */
	@Override
	public int updateZhWaiter(ZhWaiter zhWaiter)
	{
	    return zhWaiterMapper.updateZhWaiter(zhWaiter);
	}

	/**
     * 删除客服对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteZhWaiterByIds(String ids)
	{
		return zhWaiterMapper.deleteZhWaiterByIds(Convert.toStrArray(ids));
	}
	
}
